cmake_minimum_required(VERSION 3.12)
set(PROJECT_NAME KPT_v3-editor)
project(${PROJECT_NAME})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED FALSE)

if (WIN32)
    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

set(IMGUI_DIR vendor/imgui)

file(GLOB_RECURSE SRC_FILES src/*.cpp)
file(GLOB IMGUI_SRC_FILES ${IMGUI_DIR}/*.cpp 
                    ${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp 
                    ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp)

file(GLOB_RECURSE HEADER_FILES src/*.h)

include_directories(src)
include_directories(vendor/imgui)
include_directories(../runtime/vendor/glfw/include)

add_library(${PROJECT_NAME} STATIC ${SRC_FILES} ${IMGUI_SRC_FILES} ${HEADER_FILES})
target_link_libraries(${PROJECT_NAME})